#!/bin/sh
# srcid2rd
# set -x
# make sure the source is in command mode
hwblkio -W -b 1 -B 1 -y -@0x00002224 -V 0xA3A3A3A3
sleep 1
# send srcid2rd command
hwblkio -W -b 1 -B 1 -y -@0x00002224 -V 0x9E9E9E9E 
sleep 1
# Read value
hwblkio -R -s 1 -b 3 -B 4 -y -@0x0000223c | xd -An | $NULL
echo "the arbitrary source ROM contains firmware with revision date"
hwblkio -R -s 1 -b 3 -B 4 -y -@0x0000223c | xd -An -tx 
echo "the new arbitrary source firmware revision is"
cat rev.txt
